/*
 * @Author: huangyq
 * @Date: 2022-04-21 15:18:36
 * @LastEditTime: 2022-04-21 15:29:41
 * @LastEditors: huangyq
 * @Description: 数据存储
 * @FilePath: /vue3-boilerplate-pc-client/src/utils/storageUtils.ts
 */

/**
 * set
 * @param key
 * @param value
 */
export function setStorage(key: string, value: string) {
  sessionStorage.setItem(key, value)
}

/**
 * get
 * @param key
 * @returns
 */
export function getStorage(key: string) {
  return sessionStorage.getItem(key)
}

/**
 * clear
 */
export function clearStorage() {
  sessionStorage.clear()
}

/**
 * remove
 * @param key
 */
export function removeStorage(key: string) {
  sessionStorage.removeItem(key)
}
